package cn.exrick.xboot.modules.activiti.vo;

import cn.exrick.xboot.common.constant.ActivitiConstant;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by cailiang on 2019/11/15.
 */
@Data
@ApiModel(value = "业务&表单")
public class ActBusiMatter {

    private String id;

    @ApiModelProperty(value = "申请标题")
    private String title;

    @ApiModelProperty(value = "工单编号")
    private String workId;

    @ApiModelProperty(value = "创建用户id")
    private String userId;

    @ApiModelProperty(value = "关联表id")
    private String tableId;

    @ApiModelProperty(value = "流程定义id")
    private String procDefId;

    @ApiModelProperty(value = "流程实例id")
    private String procInstId;

    @ApiModelProperty(value = "状态 0草稿默认 1处理中 2结束")
    private Integer status = ActivitiConstant.STATUS_TO_APPLY;

    @ApiModelProperty(value = "结果状态 0未提交默认 1处理中 2通过 3驳回")
    private Integer result = ActivitiConstant.RESULT_TO_SUBMIT;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    private String createBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date applyTime;

    @ApiModelProperty(value = "历史标记")
    private Boolean isHistory;

    @ApiModelProperty(value = "分配用户id")
    private String[] assignees;

    @ApiModelProperty(value = "所属流程名")
    private String processName;

    @ApiModelProperty(value = "前端路由名")
    private String routeName;

    @ApiModelProperty(value = "任务优先级 默认0")
    private Integer priority = 0;

    @ApiModelProperty(value = "当前任务")
    private String currTaskName;

    @ApiModelProperty(value = "是否发送站内消息")
    private Boolean sendMessage;

    @ApiModelProperty(value = "是否发送短信通知")
    private Boolean sendSms;

    @ApiModelProperty(value = "是否发送邮件通知")
    private Boolean sendEmail;


    private String field0001;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0002;
    private String field0003;
    private String field0004;
    private String field0005;
    private String field0006;
    private String field0007;
    private String field0008;
    private String field0009;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0010;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0011;
    private String field0012;
    private String field0013;
    private String field0014;
    private String field0015;
    private String field0016;
    private String field0017;
    private String field0018;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0019;
    private String field0020;
    private String field0021;
    private String field0022;
    private Integer field0023;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0024;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0025;
    private String field0026;
    private String field0027;
    private String field0028;
    private String field0029;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date field0030;
    private String field0031;
    private String field0032;
    private String field0033;
    private Integer field0034;
    @Column(precision = 10, scale = 2)
    private BigDecimal field0035;
    @Column(precision = 10, scale = 2)
    private BigDecimal field0036;
    private Integer field0037;
    private Integer field0038;
    private Integer field0039;
    private Integer field0040;
    private String field0041;
    private String field0042;
    private String field0043;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;
    @JsonIgnore
    @ApiModelProperty(value = "流程设置参数")
    private Map<String, Object> params = new HashMap<>(16);

    @ApiModelProperty(value = "额外补充")
    private String extra;
}
